Class BlankJEIRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>

java.lang.Object
jeresources.jei.BlankJEIRecipeCategory<T>
All Implemented Interfaces:
mezz.jei.api.recipe.category.IRecipeCategory<T>
Direct Known Subclasses:
DungeonCategory, EnchantmentCategory, MobCategory, PlantCategory, VillagerCategory, WorldGenCategory

public abstract class BlankJEIRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension> extends Object implements mezz.jei.api.recipe.category.IRecipeCategory<T>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BlankJEIRecipeCategory(mezz.jei.api.gui.drawable.IDrawable icon)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(T recipe, @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, @NotNull com.mojang.blaze3d.vertex.PoseStack poseStack, double mouseX, double mouseY)
    Draw extras or additional info about the recipe.
    @NotNull mezz.jei.api.gui.drawable.IDrawable
    Icon for the category tab.
    @NotNull List<net.minecraft.network.chat.Component>
    getTooltipStrings(T recipe, @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
    Get the tooltip for whatever is under the mouse.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface mezz.jei.api.recipe.category.IRecipeCategory

    draw, getBackground, getRecipeClass, getRecipeType, getRegistryName, getTitle, getTooltipStrings, getUid, handleClick, handleInput, isHandled, setIngredients, setRecipe, setRecipe, setRecipe
  • Constructor Details

    • BlankJEIRecipeCategory

      protected BlankJEIRecipeCategory(mezz.jei.api.gui.drawable.IDrawable icon)
  • Method Details

    • getIcon

      @NotNull public @NotNull mezz.jei.api.gui.drawable.IDrawable getIcon()
      Description copied from interface: mezz.jei.api.recipe.category.IRecipeCategory
      Icon for the category tab. You can use IGuiHelper.createDrawableIngredient(IIngredientType, Object) to create a drawable from an ingredient.
      Specified by:
      getIcon in interface mezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
      Returns:
      icon to draw on the category tab, max size is 16x16 pixels.
    • draw

      public void draw(T recipe, @NotNull @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, @NotNull @NotNull com.mojang.blaze3d.vertex.PoseStack poseStack, double mouseX, double mouseY)
      Description copied from interface: mezz.jei.api.recipe.category.IRecipeCategory
      Draw extras or additional info about the recipe. Use the mouse position for things like button highlights. Tooltips are handled by IRecipeCategory.getTooltipStrings(Object, IRecipeSlotsView, double, double)
      Specified by:
      draw in interface mezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
      Parameters:
      recipe - the current recipe being drawn.
      recipeSlotsView - a view of the current recipe slots being drawn.
      poseStack - the current PoseStack for rendering.
      mouseX - the X position of the mouse, relative to the recipe.
      mouseY - the Y position of the mouse, relative to the recipe.
      See Also:
      • for a simple class for drawing things.
      • for useful functions.
      • for information about the ingredients that are currently being drawn.
    • getTooltipStrings

      @NotNull public @NotNull List<net.minecraft.network.chat.Component> getTooltipStrings(T recipe, @NotNull @NotNull mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY)
      Description copied from interface: mezz.jei.api.recipe.category.IRecipeCategory
      Get the tooltip for whatever is under the mouse. Ingredient tooltips are already handled by JEI, this is for anything else. To add to ingredient tooltips, see IRecipeSlotBuilder.addTooltipCallback(IRecipeSlotTooltipCallback)
      Specified by:
      getTooltipStrings in interface mezz.jei.api.recipe.category.IRecipeCategory<T extends mezz.jei.api.recipe.category.extensions.IRecipeCategoryExtension>
      Parameters:
      recipe - the current recipe being drawn.
      recipeSlotsView - a view of the current recipe slots being drawn.
      mouseX - the X position of the mouse, relative to the recipe.
      mouseY - the Y position of the mouse, relative to the recipe.
      Returns:
      tooltip strings. If there is no tooltip at this position, return an empty list.